<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex logOutReason_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-stretch justify-between logOutReason_fd0_0'>
					<view class='flex flex-wrap align-center logOutReason_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  logOutReason_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='logOutReason_fd0_0_c1_c0'>注销账号</text>
					</view>
					<view class='flex align-center justify-end logOutReason_fd0_0_c2'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#AD3823"></u-loading>
				<view>加载中</view>
			</view>
			<block v-else>
				<!---注销账号原因-带图flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch logOutReason_flex_1">
					<view class='flex flex-wrap align-center logOutReason_fd1_0'>
						<text class='logOutReason_fd1_0_c0'>账号注销</text>
					</view>
					<view style="font-size: 28rpx;color: #666;">永久注销且无法恢复，请谨慎操作</view>
					<view class='flex flex-wrap align-center logOutReason_fd1_2'>
						<text class='logOutReason_fd1_0_c0'>请选择注销账号的原因：</text>
					</view>
					<view class='flex flex-direction flex-wrap align-stretch'>
						<benben-select-diy ref="showSelectPopup1686883023515"
							class-name='flex flex-direction align-stretch flex' :items.sync="changeType"
							v-model="changeId" default-type="aid" default-label="title" :allow-cancel='false'
							type="radio" :disabled='false'>
							<template v-for='(item,key0) in changeType'>
								<view v-if="item.isSelected" class='flex align-center justify-between flex logOutReason_fd1_3_c0_c0'
									:key="key0" @tap="$refs.showSelectPopup1686883023515.tapHandle(key0)">
									
									<text class='logOutReason_fd1_1'>{{item.title}}</text>
									<image class='logOutReason_fd1_3_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"3.png"'></image>
								</view>
								<view v-else class='flex align-center justify-between flex logOutReason_fd1_3_c0_c0' :key="key0"
									@tap="$refs.showSelectPopup1686883023515.tapHandle(key0)">
									
									<text class='logOutReason_fd1_1'>{{item.title}}</text>
									<image class='logOutReason_fd1_3_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"135.png"'>
									</image>
								</view>
							</template>
						</benben-select-diy>
					</view>
					<view class='logOutReason_fd1_4'>请填写注销原因</view>
					<view class='flex flex-wrap logOutReason_fd1_5'>
						<textarea class='flex logOutReason_input_fd1_5' confirm-type="done" :placeholder="'请输入~'" :maxlength="240" placeholder-style="color:#999;font-size:28rpx;" v-model="body" />
					</view>
					<button class='flex-sub logOutReason_fd1_6' @tap.stop="goRichFunc()">下一步</button>
				</view>

				<!---注销账号原因-带图flex布局结束-->
			</block>
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"changeType": [],
				"changeId": "",
				"body": "",
				"isShow": true,
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getReasonFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//跳转风险
			goRichFunc() {
				if (!validate(this.changeId, 'require')) {
					this.$message.info('请选择注销原因');
					return false;
				}
				if (!validate(this.body, 'require')) {
					this.$message.info('请填写注销原因');
					return false;
				}
				this.$urouter.redirectTo(
					`/pages/xitongs/logOutRisk/logOutRisk?cancel_type=${this.changeId}&cancel_reason=${this.body}`);
			},
			getReasonFunc() {
				this.$api.post(global.API_VERSION + '61e53ff1f2406', {

				}).then(res => {
					// console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.changeType = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background-size: 100% auto;
		background-color: #FFFFFF;
	}

	.logOutReason_flex_0 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background: #fff;
		background-size: 100% auto !important;
	}

	.logOutReason_fd0_0_c2 {
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 100rpx;
	}

	.logOutReason_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 50rpx;
	}

	.logOutReason_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 400;
		color: #333;
	}

	.logOutReason_fd0_0_c0 {
		width: 100rpx;
	}

	.logOutReason_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.logOutReason_flex_1 {
		font-size: 32rpx;
		background-size: 100% auto !important;
		padding: 32rpx;
	}

	.logOutReason_fd1_6 {
		background: #F45656;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #fff;
		margin: 0rpx 32rpx 0rpx 32rpx;
		height: 80rpx;
		line-height: 80rpx;
		width: 686rpx;
		position: fixed;
		left: 0rpx;
		bottom: calc(40rpx + var(--window-bottom));
	}

	.logOutReason_input_fd1_5 {
		width: 100%;
		height: 218rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: var(--benbenFontColor0);
	}

	.logOutReason_fd1_5 {
		background: #F6F6F6;
		width: 100%;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 24rpx 24rpx 24rpx 24rpx;
	}

	.logOutReason_fd1_4 {
		font-size: 28rpx;
		font-weight: 400;
		color: #FF6969;
		padding: 32rpx 0rpx 24rpx 0rpx;
	}

	.logOutReason_fd1_3_c0_c0_c0 {
		width: 32rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 20rpx 0rpx 0rpx;
	}

	.logOutReason_fd1_3_c0_c0 {
		padding: 28rpx 0rpx 28rpx 0rpx;
		border-bottom: 1rpx solid #eee;
	}

	.logOutReason_fd1_2 {
		margin: 48rpx 0rpx 0rpx 0rpx;
	}

	.logOutReason_fd1_1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: var(--benbenFontColor0);
	}

	.logOutReason_fd1_0_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 700;
		color: var(--benbenFontColor0);
	}

	.logOutReason_fd1_0 {
		padding: 0rpx 0rpx 20rpx 0rpx;
	}
</style>